<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    {% for p in c_page %}
        <p>
            {{ p }}
        </p>
    {% endfor %}

{% if c_page.has_previous %}
    <a href="/test_page?page={{ c_page.previous_page_number }}">上一页</a>
{% else %}
    上一页
{% endif %}

{% for p_num in paginator.page_range %}
    {% if p_num == c_page.number %}
        {{ p_num }}
    {% else %}
        <a href="/test_page?page={{ p_num }}">{{ p_num }}</a>
    {% endif %}
{% endfor %}


{% if c_page.has_next %}
    <a href="/test_page?page={{ c_page.next_page_number }}">下一页</a>
{% else %}
    下一页
{% endif %}

</body>
</html>